from django.views import View


class IndexView(View):

    def get(self, request):
        """
            获取注册页面
        :param request:
        :return:
        """
        # 生成表单对象
        register_form = RegisterForm()
        # 调用模版渲染生成表单
        return render(request, 'index.html', {
            'all_banners': all_banners,
            'courses': courses,
            'banner_courses': banner_courses,
            'course_orgs': course_orgs,
        })
